select a.matricule,libressource1,libressource2,datpla,plage,a.typjrs,a.hrsdeb,a.hrsfin,a.codposte,libposte,b.col01
                              FROM postpla a, poste b, rcressource c
                              where
                              a.matricule=c.matricule
                              and a.codposte=b.codposte
                              and col01 = 'ADS-RMPV'
                              and datpla = to_date('2014-04-01', 'YYYY-MM-DD')
                              and libposte <> 'RESPONSABLE SITE'            
                              and a.matricule <> '01483';

select distinct(abs.matricule), abs.codabs, poste.libposte, col01, sal.libressource1, sal.libressource2, abs.datdeb, abs.datfin, max(post.datpla) as datepost
                             from tbabsenc abs inner join rcressource sal on abs.matricule = sal.matricule
                             left join postpla post on post.matricule = abs.matricule
                             inner join poste poste on poste.codposte = post.codposte  
                        WHERE abs.datdeb <= to_date('2014-04-01', 'YYYY-MM-DD') and datfin >= to_date('2014-04-01','YYYY-MM-DD')
                        and
                        col01 = 'ADS-RMPV'
                        and post.datpla > to_date('2013-09-30','YYYY-MM-DD')
                        group by abs.matricule, poste.libposte, abs.codabs, col01, sal.libressource1, sal.libressource2, abs.datdeb, abs.datfin
                        order by sal.libressource1, datepost desc;          
                              
                              
                      